package com.lyeducation.services.order;

import com.lyeducation.controllers.dto.OrderCancelDTO;
import com.lyeducation.controllers.dto.OrderDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * @InterfaceName UesrOrderService
 * @Description
 * @Author Sky1in3
 * @Date 2019/1/11 18:10
 * @Version 1.0
 */
public interface UesrOrderService {
    /**
     * @return com.lyeducation.controllers.dto.OrderDTO
     * @Author Sky1in3
     * @Description 创建订单
     * @Date 2019/1/12 18:38
     * @Param [orderDTO]
     */
    OrderDTO create(OrderDTO orderDTO);

    /**
     * @return com.lyeducation.controllers.dto.OrderDTO
     * @Author Sky1in3
     * @Description 查询单个订单
     * @Date 2019/1/12 18:42
     * @Param [orderId]
     */
    OrderDTO findOne(String buyerOpenid, String orderId);

    /**
     * @return
     * @Author Sky1in3
     * @Description 取消订单
     * @Date 2019/1/12 18:56
     * @Param
     */
    OrderCancelDTO cancel(String buyerOpenid, String orderId);

    /**
     * @return com.lyeducation.controllers.dto.OrderDTO
     * @Author Sky1in3
     * @Description 完结订单
     * @Date 2019/1/12 18:57
     * @Param [orderDTO]
     */
    OrderDTO finish(String buyerOpenid, String orderId);

    /**
     * @return com.lyeducation.controllers.dto.OrderDTO
     * @Author Sky1in3
     * @Description 支付订单
     * @Date 2019/1/12 19:09
     * @Param [orderDTO]
     */
    OrderDTO paid(OrderDTO orderDTO);

    /**
     * @return com.lyeducation.controllers.dto.OrderDTO
     * @Author Sky1in3
     * @Description 查询个人订单列表
     * @Date 2019/1/12 22:08
     * @Param [orderDTO]
     */
    Page<OrderDTO> findList(String buyerOpenid, Pageable pageable);
}
